const url = require('url')

let obj = url.parse('http://127.0.0.1:8989/pinglun?name=dsd&message=sdsdasdasdasd', true)
console.log(obj);
/**
 * Url {
  protocol: 'http:',
  slashes: true,
  auth: null,
  host: '127.0.0.1:8989',
  port: '8989',
  hostname: '127.0.0.1',
  hash: null,
  search: '?name=dsd&message=sdsdasdasdasd',
  query: { name: 'dsd', message: 'sdsdasdasdasd' },
  pathname: '/pinglun',
  path: '/pinglun?name=dsd&message=sdsdasdasdasd',
  href:
   'http://127.0.0.1:8989/pinglun?name=dsd&message=sdsdasdasdasd' }
 */
console.log(obj.query); // { name: 'dsd', message: 'sdsdasdasdasd' }